<?php
require_once 'config.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    updateTimerData([
        'start_time' => null,
        'is_running' => false,
        'elapsed_time' => 0,
        'blue_score' => 0,
        'red_score' => 0
    ]);
    echo "数据已重置成功";
} else {
    echo '
    <form method="POST">
        <button type="submit">重置所有数据</button>
    </form>';
}
?>